home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-05-03 | 956 b | 25 lines | [TEXT/ToyS] |
- on run
- set pth to (path to preferences folder)
- set oldDelims to AppleScript's text item delimiters
- set AppleScript's text item delimiters to ":"
- set t1 to (current date in seconds)
- set l to list folder pth
- set l to l & l & l & l & l & l & l & l & l & l & l & l & l
- set t2 to (current date in seconds)
- set n to number of items in l
- try
- display dialog ((t2 - t1) as string) & " seconds to create the list of " & n & ¬
- " elements." & return & "(" & ((t2 - t1) / n) & " seconds/element)." & return & ¬
- "Sort it now?"
- on error
- set AppleScript's text item delimiters to oldDelims
- error number -128
- end try
- set t1 to (current date in seconds)
- sort l
- set t2 to (current date in seconds)
- display dialog ((t2 - t1) as string) & " seconds to sort the list of " & n & ¬
- " elements." & return & "(" & ((t2 - t1) / n) & " seconds/element)." buttons {"OK"} default button 1
- set AppleScript's text item delimiters to oldDelims
- return
- end run